export default {
	export default {
		namespaced: true,
		state: () => ({
			userInfo: {}
		}),
		Mutations: {
	
		},
		actions: {
			async login({
				commit,
				state
			}, payload) {
				const data = await api.login(payload)
				if (data.statusCode == 400) {
					uni.showToast({
						title: data.data,
						icon: "none"
					})
				} else {
					uni.switchTab({
						url: "/pages/home/home"
					})
					uni.setStorageSync("token", data.accessToken)
					uni.showToast({
						title: "登录成功",
						icon: "none"
					})
				}
			}
		
		}
	}
}